Practical Exception Specifications
نویسندگان
چکیده
Exception specifications can aid in the tasks of writing correct exception handlers and understanding exceptional control flow, but current exception specification systems are impractical in a number of ways. In particular, they are too low-level, too heavyweight, and do not provide adequate support for describing exception policies. We propose a novel and lightweight exception specification system that provides integrated support for specifying, understanding, and evolving exception policies. Our tool, implemented as an Eclipse plugin for Java, combines user annotations, program analysis, refactorings, and GUI views that display analysis results. Using our tool, we analyzed six programs and observed a 50 to 93% reduction in programmer-supplied
منابع مشابه
On a New Notion of Partial Refinement
Formal specification techniques allow expressing idealized specifications, which abstract from restrictions that may arise in implementations. However, partial implementations are universal in software development due to practical limitations. Our goal is to contribute to a method of program refinement that allows for partial implementations. For programs with a normal and an exceptional exit, ...
متن کاملMining API Error-Handling Specifications from Source Code
API error-handling specifications are often not documented, necessitating automated specification mining. Automated mining of error-handling specifications is challenging for procedural languages such as C, which lack explicit exception-handling mechanisms. Due to the lack of explicit exception handling, error-handling code is often scattered across different procedures and files making it diff...
متن کاملSemantic Relation Based Exception Detection in Workflow Systems
Due to foreseen or unforeseen situations, deviations of workflow processes from their specifications are unavoidable. To reduce exceptions at run-time, exceptions should be found out first. An approach to detect exceptional path of workflow is presented. The proposed method analyzes the semantic relations between business activities first, and then describes them as data dependency rules. Using...
متن کاملException Handling and Term Labelling
We propose a new algebraic framework for exception handling which is powerful enough to cope with many exception handling features such that recovery, implicit propagation of exceptions, etc. This formalism is capable of treating all the exceptional cases, including the following ones: “intrinsic” exceptions which are related to the underlying data structure (for instance, popping an emptstack ...
متن کاملRepresentation of Semiautomata by Canonical Words and Equivalences, Part II: Specification of Software Modules
A theory of representation of semiautomata by canonical words and equivalences was developed in [7]. That work was motivated by trace-assertion specifications of software modules, but its focus was entirely on the underlying mathematical model. In the present paper we extend that theory to automata with Moore and Mealy outputs, and show how to apply the extended theory to the specification of m...
متن کامل